import React, { Component } from 'react';

export default class Husband extends Component {
  render() {
    return (
      <div style={{ padding: '10px', border: '10px solid #ccc' }}>
        <h1>老公的钱: </h1>
        <button
          // 4. Husband子组件通过调用父传子的回调函数, 实现赚钱
          onClick={this.props.handleMakeMoney}
        >
          老公赚钱
        </button>
      </div>
    );
  }
}
